home *** CD-ROM | disk | FTP | other *** search
- Path: gaia.ns.utk.edu!mbk
- From: mbk@caffeine.engr.utk.edu (RHS Linux User)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Followup-To: comp.lang.misc
- Date: 11 Mar 1996 21:35:43 GMT
- Organization: University of Tennessee, Knoxville and Oak Ridge National Laboratory
- Message-ID: <4i26bf$hki@gaia.ns.utk.edu>
- References: <4h5hgj$vpd@tomquartz.niestu.com> <4h7jskINNnph@anvil.ugrad.cs.ubc.ca> <313EDF38.61C1@lfwc.lockheed.com> <DnyCz1.A1n@research.att.com>
- Reply-To: kennel@msr.epm.ornl.gov
- NNTP-Posting-Host: caffeine.engr.utk.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Andrew Koenig (ark@research.att.com) wrote:
- : In article <313EDF38.61C1@lfwc.lockheed.com> Ken Garlington <GarlingtonKE@lfwc.lockheed.com> writes:
-
- : > Kazimir Kylheku wrote:
-
- : > > This is false. There are compilers which offer range checking. In a situation
- : > > where safety-critical software is designed, such a compiler should be used.
-
- : > I thought you were arguing the merits of two languages. Does the C _language_
- : > standard define the syntax and sematics of built-in range checking?
-
- : Yes and no. It defines what a range error is, then leaves it up to the
- : implementation to check for it or not. Most, but not all, C implementations
- : don't bother to check, partly because checking is expensive at run time.
-
- I suspect that this checking is more expensive or difficult to implement
- than similar checking for other languages becuase of the pointer/array
- ambiguity in C/C++. (an argument typed as a T* might be to the beginning
- of heap storage, beginning of stack storage, or middle of any of them, or
- just to a single element not in an array, or to another element embedded
- inside a structure, or to an array embedded in another structure, or
- somewhere else entirely.)
-
- By contrast, nearly every Fortran or Ada or Eiffel compiler has an option
- to check array-out-of-bounds errors.
-
- Let's find the real reason why.....
-
-
-
- : --
- : --Andrew Koenig
- : ark@research.att.com
-